using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;
using System.Web;

namespace Inspired.Euler
{
    public static class Problem266
    {
        /// <summary>
        /// Pseudo Square Root
        /// </summary>
        [EulerProblem(266, Title = "Pseudo Square Root")]
        public static long Solve()
        {
           //var x = 3102L.Divisors().OrderByDescending(div => div).First(div => div < Math.Sqrt(3102));

            BigInteger p = new BigInteger(1);
            foreach (int prime in 190.Primes())
                p = BigInteger.Multiply(p, prime);

            BigInteger sqrt = new BigInteger(1);
            //BigInteger largest = BigInteger.

            //BigInteger psr = 

            //.GreatestCommonDivisor(p, 0.5);

            //The divisors of 12 are: 1,2,3,4,6 and 12.
            //The largest divisor of 12 that does not exceed the square root of 12 is 3.
            //We shall call the largest divisor of an integer n that does not exceed the square root of n the pseudo square root 
            //It can be seen that PSR(3102)=47.

            //Let p be the product of the primes below 190.
            //Find PSR(p) mod 10^16.

            //PSR(3102) = 47.
            //psr(12);

            return 0;
        }

        static long psr(long n)
        {
            return 0;
        }
    }
}